home *** CD-ROM | disk | FTP | other *** search
- Path: news.ran.es!usenet
- From: mper@ran.es (Martin Percossi)
- Newsgroups: comp.lang.c++
- Subject: Re: [help] 3D Array class
- Date: 27 Jan 1996 20:30:12 GMT
- Organization: RAN INTERNET
- Message-ID: <4ee20k$577@news.ran.es>
- References: <4e5sg8$r4h@geraldo.cc.utexas.edu>
- NNTP-Posting-Host: ppp014.ran.es
-
- Bad news. There is no [][][] operator in c++; only a [] operator. Now you can have
- 3D arrays of ints and chars, etc, because really what your doing is making an array of an array,
- not a fundamentally new structure. So there is no [][][] operator that you can overload. What that
- means is that you have to create "helper" classes. I┤m not so sure how to do this myself, but basically it
- would involve making a different class for each additional "dimension", so a 3D array would require three
- classes in total, each having an [] that indexes the next class, if you get what I mean.
-
- Hope this helps,
- Martin.
-
-